package com.yibo.support.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * 内部异常
 *
 * @author zhanglei
 */
@Getter
@Setter
public class YBException extends RuntimeException{

    private int code = -1;

    private String msg;

    public YBException() {
        super();
    }

    public YBException(String message){
        super(message);
        printStackTrace();
        this.msg = message;
    }

    public YBException(int code,String message) {
        super(message);
        printStackTrace();
        this.msg = message;
        this.code = code;
    }

    public YBException(String message, Throwable cause) {
        super(message, cause);
    }

    public YBException(Throwable cause) {
        super(cause);
    }

    protected YBException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
